<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        let obj = {x:1,y:99,z:'Hello'};
        let t = 2;
        //obj.y = 100;
        //属性名表达式
        obj['y'+t]= 100
        console.log(obj,);

        //遍历对象：
        //对象属性名表达式：主要用来解决对象的属性名不是一固定的字符串时
        for(let item in obj){
            console.log(item,obj[item],'item');
        }
    </script>
</head>
<body>
    
</body>
</html>